package cn.ljy.authority.web.controller.backstage.system.daily;


import cn.ljy.authority.model.SysDaily;
import cn.ljy.authority.model.query.SysDailyQuery;
import cn.ljy.authority.service.SysDictService;
import cn.ljy.authority.web.controller.backstage.BaseBackstageController;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "后台日志管理模块")
@RestController
@RequestMapping(value = "/backstage/system/daily")
public class SysDailyController extends BaseBackstageController<SysDaily, SysDailyQuery, String> {

    @Autowired
    private SysDictService sysDictService;

    @Override
    protected String getAuthorityPrefix() {
        return "sys:daily"; // 定义模块权限前缀
    }

//    @ApiOperation(value = "读取指定日志记录")
//    @PreAuthorize("hasAuthority('sys:daily:query')")
//    @Override
//    protected ResponseData get(@PathVariable("id") String id) {
//        return super.get(id);
//    }
//
//    @ApiOperation(value = "分页查询日志")
//    @PreAuthorize("hasAuthority('sys:daily:query')")
//    @Override
//    protected ResponseData query(Integer page, Integer pageSize, SysDailyQuery query) {
//        return super.query(page, pageSize, query);
//    }
//
//    @ApiOperation(value = "批量删除指定的多个日志")
//    @PreAuthorize("hasAuthority('sys:daily:del')")
//    @Override
//    public ResponseData deletes(@NotEmpty(message = "请选择要移除的记录") String[] ids) {
//        return super.deletes(ids);
//    }

//    @Override
//    public ResponseData edit(@Validated({UpdateWorkValidation.class}) @RequestBody SysDaily sysDaily) {
//        //设置用户
//        sysDaily.setLastAuthor(UserUtil.getLoginUser());
//        return super.edit(sysDaily);
//    }
//
//    @Override
//    protected ResponseData add(@Validated({AddWorkValidation.class}) @RequestBody SysDaily sysDaily) {
//        //设置用户
//        sysDaily.setAuthor(UserUtil.getLoginUser());
//        return super.add(sysDaily);
//    }


    //=========================扩展部分=============================================//
}
